home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
jaz_clib.arc
/
JZREBOOT.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-04-09
|
965b
|
35 lines
Comment *
┌────────────────────────────────────────────────────────────────────────────┐
│jzreboot.asm │
│Reboot an IBM PC or compatible. │
│synopsis │
│ jzreboot(1) | jzreboot(0) where 1 means cold boot and 0 means warm boot │
│ │
│ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 │
└────────────────────────────────────────────────────────────────────────────┘
*
bios segment at 0f000h
org 0fff0h
reset label far
bios ends
assume cs:_text
_text segment public byte 'code'
public _jzreboot
_jzreboot proc near
mov bp,sp ; don't need to save registers here !!!!!
mov ax,[bp+2] ; get boot type
cmp ax,1 ; cold boot request?
jz _jzreboot1
mov ax,40h ; setting location 0x40:0x72 = 1234h
mov si,72h ; makes bios thing that ctrl-alt-delete was
mov ds,ax ; pressed !!!!
mov [si],1234h
_jzreboot1:
assume cs:bios
jmp reset
_jzreboot endp
_text ends
end